<template>
  <div id="red-education">
    <el-row
      style="
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        justify-items: between;
      "
    >
      <el-col :xs="0" :sm="4" :md="4" :lg="5" :xl="4" style="width: 100%">
        <div class="box">
          <p style="font-weight: 800">社区目前已有</p>
          <el-statistic title="注册用户" :value="268500" />
          <el-statistic title="游记篇数" :value="200" />
          <el-button @click="router.push('/user-login')">登录</el-button>
          <el-button @click="router.push('/user-register')">注册</el-button>
          <el-button @click="router.push('/auth/edite-travel')">写游记</el-button>
        </div>
        <div class="box">
          分类标签
          <router-link to="/landscape">风景墙</router-link>
        </div>
      </el-col>
      <el-col :xs="24" :sm="20" :md="20" :lg="12" :xl="10">
        <el-row style="margin-top: 5px">
          <button @click="router.push('/forum/relevant')">相关</button>
          <button @click="router.push('/forum/latest')">最新</button>
          <button @click="router.push('/forum/top')">置顶</button>
          <button @click="router.push('/forum/passage-filter')">游记筛选</button>
        </el-row>
        <el-row>
          <router-view></router-view>
        </el-row>
      </el-col>
      <el-col :xs="0" :sm="0" :md="0" :lg="6" :xl="4">
        <div class="box">
          <el-calendar v-model="value" />
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script setup lang="ts">
import router from '@/router'
import { ref } from 'vue'
import { useCurrentUserStore } from '@/stores/useCurrentUserStore.ts'

const value = ref(new Date())
const currenUser = useCurrentUserStore()
console.log('论坛打印:')
console.log(currenUser.loginUser)
</script>

<style scoped>
.el-col {
  margin: 20px 5px;
}

.box {
  background-color: white;
  margin: 10px auto;
  width: 90%;
  padding: 10px;
  border-radius: 5px;
}

button {
  display: inline-block;
  padding: 6px 12px;
  margin: 4px 4px 0 0;
  font-size: 14px;
  color: #3d3d3d;
  border-radius: 3px;
  text-decoration: none;
  border: none;
  border: 1px solid transparent;
  background-color: white;
  transition: 5ms;
}

button:hover {
  background-color: #e2e2e2;
  /* border: 1px solid #d1d5da; */
}
</style>
